import { Component, OnInit } from '@angular/core';
import { CalendarComponentOptions } from 'ion2-calendar';

@Component({
  selector: 'app-testdategird',
  templateUrl: './testdategird.page.html',
  styleUrls: ['./testdategird.page.scss'],
})
export class TestdategirdPage implements OnInit {
 data= '';
 
 optionsRange: CalendarComponentOptions = {
  pickMode: 'single',
  weekdays:['日', '一', '二', '三', '四', '五', '六'],
  monthPickerFormat:['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
  monthFormat:'M月 YYYY',
  weekStart:1,
  daysConfig: [
{  date: new Date('2019-10-2'),
    subTitle:'+1'}],
};


  constructor() { }

  ngOnInit() {
  }

  onSelect(event) {
    // alert(';');
    console.log(event);
    var date = new Date(event.time);
    console.log(date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate());

  }
}
